/**
 * Created by tums on 13/8/15.
 */
import AppDispatcher from './AppDispatcher.js';

let TodoActions = {
    create: function (text) {
        AppDispatcher.dispatch({
            actionType: 'CREATE',
            text: text
        });
    },
    delete: function (id) {
        AppDispatcher.dispatch({
            actionType: 'DESTORY',
            id: id
        });
    },
    complete: function (id) {
        AppDispatcher.dispatch({
            actionType: 'COMPLETE',
            id: id
        });
    },
    filterComplete: function () {
        AppDispatcher.dispatch({
            actionType: 'FILTER',
            complete: true
        });
    }
};

export {TodoActions as default };